<?php

require_once 'SmartL/Application.php';

class SmartL_Zend_Controller_Router_RewriteTest_AppMock extends SmartL_Application 
{
	static private $instance;
	
	static public function getInstance()
	{
		return new SmartL_Zend_Controller_Router_RewriteTest_AppMock();
	}
	
	public function getSupportedLanguages()
	{
		return array( new SmartL_Application_Config_LanguageInfo("en-GB"),
			new SmartL_Application_Config_LanguageInfo("en-US"),
			new SmartL_Application_Config_LanguageInfo("cs-CZ") );
	}
	
	public function isSupportedLanguage($language,$compareCultures=true) {		
		if ( $compareCultures )
			return ( array_search($language->getId(),array("en-US","en-GB","cs-CZ")) !== false );
		else
			return ( array_search($language->getLanguageId(),array("en","en","cs")) !== false );
	}
	
	public function getDefaultCulture($language) {
		if ( $language instanceof SmartL_Application_Config_LanguageInfo ) $language = $language->getId();
		
		if ( $language == "en" ) return new SmartL_Application_Config_LanguageInfo("en-GB");
		else return new SmartL_Application_Config_LanguageInfo("cs-CZ"); 
	}
}